import http from "@/api";
import { ReqPage, ResPage } from "@/api/interface/index";

/**
 * @name 菜单管理模块
 */
// * 获取菜单列表
export const getMenuList = (params: ReqPage) => {
	return http.get<ResPage<Menu.MenuInfo>>(`/menu/find`, params);
};

// * 新增菜单
export const addMenu = (params: any) => {
	return http.post(`/menu/add`, params);
};

// * 编辑菜单
export const editMenu = (params: any) => {
	return http.post(`/menu/modify`, params);
};

// * 删除菜单
export const deleteMenu = (params: { id: string; ids?: string }) => {
	return http.post(`/menu/remove`, params);
};
